<?php
// *** Tangra (Application Framework and Tools for PHP)
// $Id$
//

require_once($PATHS->get_hidden().'inc/_sys/my_web_site_config.class.php');
require_once($PATHS->get_hidden().'inc/_sys/my_web_site_config_loader_file.class.php');

global $WSC;

$WSC = new My_Web_Site_Config();
$WSC->set_root_dir($PATHS->get_root());
$WSC->set_document_root_dir($PATHS->get_document_root());
$WSC->set_hidden_dir($PATHS->get_hidden());
$WSC->set_scratch_dir($PATHS->get_scratch());
$WSC->set_document_root_relative($PATHS->get_document_root_relative());
$WSC->set_ext_inc_dir($PATHS->get_ext_inc());

global $ERROR_REPORTING;
global $ERROR_REPORTING_PHP4_LIBS;

$WSC->set_error_reporting($ERROR_REPORTING);
$WSC->set_error_reporting_php4_libs($ERROR_REPORTING_PHP4_LIBS);


$site_config_loader_file = new My_Web_Site_Config_Loader_File();
$site_config_loader_file->load_site_config($WSC, array('ss_conf_file' => $PATHS->get_hidden().'conf/site_specific.conf',
														'ms_conf_file' => $PATHS->get_hidden().'conf/'.TANGRA_MACHINE_SPECIFIC_CONF_FILENAME,
														'db_conf_file' => $PATHS->get_hidden().'conf/db.conf')
														);

require_once(TANGRA_MAIN_DIR.'nls/string_functions.inc.php');
init_string_functions($WSC->get_default_encoding());


require_once($WSC->get_site_inc_dir().'_sys/my_web_site.class.php');

global $SITE;
$SITE = new My_Web_Site($WSC);

